# 使用基础镜像
FROM kdvolder/jdk8:latest

# 设置工作目录
WORKDIR /workdir
# 复制配置文件到镜像中
COPY application.yml /workdir/config/application.yml
# 复制jar包到镜像中
COPY ./target/*.jar /workdir/jeeidp.jar

# 设置环境变量
ENV LANG C.UTF-8
ENV LANGUAGE zh_CN.UTF-8
ENV LC_ALL C.UTF-8
ENV TZ Asia/Shanghai
ENV JAVA_OPTS="-Xms256m -Xmx512m"

# 设置暴露的端口
EXPOSE 8881
# 运行应用程序
#ENTRYPOINT ["java", "-jar", "jeeidp.jar", "--server.port=8881", "--spring.profiles.active=prod"]
ENTRYPOINT ["java", "-jar", "jeeidp.jar", "--server.port=8881", "--spring.profiles.active=prod", "--Dspring.config.location=/workdir/config/application.yml"]
